package com.command.center.pucms.common.constant;

import com.google.common.collect.Sets;

import java.util.Set;

/**
 * 常量类
 *
 * @author zlb
 */
public class Constant {
    /**
     * token到期时间30分钟，毫秒为单位
     */
    public static final long EXPIRE_TIME = 30*60*1000;

    /**
     * token到期时间31天，秒为单位
     */
    public static final long REFRESH_EXPIRE_TIME =31*24*60*60;


    /**
     * 加密token的固定参数
     */
    public static final String  TOKEN_SECRET = "8C0C80490065121DE05011AC05006452";

    /**
     * 签名生成token中存储用户姓名的key
     */
    public static final String TOKEN_USER_NAME = "userName";

    /**
     * 签名生成token中存储用户姓名的key
     */
    public static final String CURRENT_TIME = "currentTime";

    /**
     * 签名生成token中存储用户角色的key
     */
    public static final String TOKEN_USER_ROLE = "role";

    /**
     * 签名生成token中存储用户权限的key
     */
    public static final String TOKEN_USER_PERMISSION = "permission";




    /**
     * 跳过认证的controller的url
     */
    public static Set<String> METHOD_URL_SET = Sets.newConcurrentHashSet();





    /**
     * map中存储token的key
     */
    public static final String TOKEN_KEY = "token";
    /**
     * map中存储token的角色信息
     */
    public static final String ROLES = "roles";
    /**
     * map中存储token的权限信息
     */
    public static final String PERMISSIONS = "permissions";

    /**
     * 前端请求http请求头携带token的key名称
     */
    public static final String HTTP_HEADER_TOKEN_KEY = "Authorization";

    /**
     * 分割符
     */
    public static final String SEPARATOR = "_";



}
